<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>淘好货 - 个人中心</title>
    <script src="/static/css/tailwindcss.css"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#FF4400', // 主色调：橙色
                        secondary: '#FFB800', // 辅助色：黄色
                        dark: '#333333',    // 深色文本
                        light: '#F5F5F5',   // 浅色背景
                        muted: '#666666',   // 次要文本
                        success: '#00B42A', // 成功色
                        warning: '#FF7D00', // 警告色
                        danger: '#F53F3F',  // 危险色
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif']
                    }
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .user-card-shadow {
                box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
            }
        }
    </style>
</head>
<body class="bg-gray-50 text-dark">
    <div id="app">
        <!-- 导航栏 -->
        <navigation></navigation>

        <!-- 主要内容 -->
        <main class="container mx-auto px-4 py-8">
            <!-- 用户信息卡片 -->
            <div class="bg-white rounded-xl shadow-md mb-8 overflow-hidden user-card-shadow">
                <div class="bg-gradient-to-r from-primary to-primary/70 p-6 text-white">
                    <div class="flex items-center">
                        <img src="/static/img/avatar.jpg" alt="用户头像" class="w-20 h-20 rounded-full border-4 border-white shadow-lg">
                        <div class="ml-4">
                            <h2 class="text-2xl font-bold" >{{ username }}</h2>
                            <p class="text-white/80 mt-1">会员等级: 钻石会员</p>
                            <div class="flex items-center mt-2">
                                <div class="flex">
                                    <i class="fa fa-star text-yellow-300"></i>
                                    <i class="fa fa-star text-yellow-300"></i>
                                    <i class="fa fa-star text-yellow-300"></i>
                                    <i class="fa fa-star text-yellow-300"></i>
                                    <i class="fa fa-star-half-o text-yellow-300"></i>
                                </div>
                                <span class="ml-2 text-sm text-white/80">4.5 积分</span>
                            </div>
                        </div>
                        <button class="ml-auto bg-white/20 hover:bg-white/30 text-white px-4 py-2 rounded-full text-sm transition-colors">
                            <i class="fa fa-edit mr-1"></i> 编辑资料
                        </button>
                    </div>
                </div>
                
                <div class="p-6">
                    <div class="grid grid-cols-2 md:grid-cols-4 gap-4 text-center">
                        <div class="p-4 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="text-primary text-2xl mb-2">
                                <i class="fa fa-credit-card"></i>
                            </div>
                            <p class="text-muted text-sm">我的钱包</p>
                            <p class="font-bold mt-1">¥256.00</p>
                        </div>
                        <div class="p-4 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="text-primary text-2xl mb-2">
                                <i class="fa fa-ticket"></i>
                            </div>
                            <p class="text-muted text-sm">优惠券</p>
                            <p class="font-bold mt-1">12张</p>
                        </div>
                        <div class="p-4 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="text-primary text-2xl mb-2">
                                <i class="fa fa-gift"></i>
                            </div>
                            <p class="text-muted text-sm">积分</p>
                            <p class="font-bold mt-1">1,250</p>
                        </div>
                        <div class="p-4 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="text-primary text-2xl mb-2">
                                <i class="fa fa-trophy"></i>
                            </div>
                            <p class="text-muted text-sm">收藏</p>
                            <p class="font-bold mt-1">42件</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 我的订单 -->
            <div class="bg-white rounded-xl shadow-md mb-8">
                <div class="px-6 py-4 border-b border-gray-100 flex justify-between items-center">
                    <h2 class="text-xl font-bold">我的订单</h2>
                    <a href="orders.html" class="text-primary hover:text-primary/80 text-sm flex items-center">
                        查看全部 <i class="fa fa-angle-right ml-1"></i>
                    </a>
                </div>
                
                <div class="p-6">
                    <div class="grid grid-cols-5 gap-2 text-center">
                        <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary mb-2">
                                <i class="fa fa-clock-o text-xl"></i>
                            </div>
                            <p class="text-sm">待支付</p>
                            <p class="text-primary font-bold mt-1">2</p>
                        </div>
                        <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary mb-2">
                                <i class="fa fa-truck text-xl"></i>
                            </div>
                            <p class="text-sm">待发货</p>
                            <p class="text-primary font-bold mt-1">1</p>
                        </div>
                        <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary mb-2">
                                <i class="fa fa-plane text-xl"></i>
                            </div>
                            <p class="text-sm">运输中</p>
                            <p class="text-primary font-bold mt-1">3</p>
                        </div>
                        <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary mb-2">
                                <i class="fa fa-check-circle text-xl"></i>
                            </div>
                            <p class="text-sm">已完成</p>
                            <p class="text-primary font-bold mt-1">12</p>
                        </div>
                        <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer">
                            <div class="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary mb-2">
                                <i class="fa fa-refresh text-xl"></i>
                            </div>
                            <p class="text-sm">退换货</p>
                            <p class="text-primary font-bold mt-1">0</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 快捷功能 -->
            <div class="bg-white rounded-xl shadow-md mb-8">
                <div class="px-6 py-4 border-b border-gray-100">
                    <h2 class="text-xl font-bold">快捷功能</h2>
                </div>
                
                <div class="grid grid-cols-2 md:grid-cols-4 gap-1">
                    <a href="#" class="flex flex-col items-center p-6 hover:bg-gray-50 transition-colors">
                        <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center text-blue-500 mb-2">
                            <i class="fa fa-map-marker text-xl"></i>
                        </div>
                        <p class="text-sm">收货地址</p>
                    </a>
                    <a href="#" class="flex flex-col items-center p-6 hover:bg-gray-50 transition-colors">
                        <div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center text-green-500 mb-2">
                            <i class="fa fa-heart text-xl"></i>
                        </div>
                        <p class="text-sm">我的收藏</p>
                    </a>
                    <a href="#" class="flex flex-col items-center p-6 hover:bg-gray-50 transition-colors">
                        <div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center text-purple-500 mb-2">
                            <i class="fa fa-bell text-xl"></i>
                        </div>
                        <p class="text-sm">消息通知</p>
                    </a>
                    <a href="#" class="flex flex-col items-center p-6 hover:bg-gray-50 transition-colors">
                        <div class="w-12 h-12 rounded-full bg-red-100 flex items-center justify-center text-red-500 mb-2">
                            <i class="fa fa-cog text-xl"></i>
                        </div>
                        <p class="text-sm">账户设置</p>
                    </a>
                    <a href="#" class="flex flex-col items-center p-6 hover:bg-gray-50 transition-colors">
                        <div class="w-12 h-12 rounded-full bg-yellow-100 flex items-center justify-center text-yellow-500 mb-2">
                            <i class="fa fa-question-circle text-xl"></i>
                        </div>
                        <p class="text-sm">帮助中心</p>
                    </a>
                    <a href="#" class="flex flex-col items-center p-6 hover:bg-gray-50 transition-colors">
                        <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-500 mb-2">
                            <i class="fa fa-comments text-xl"></i>
                        </div>
                        <p class="text-sm">在线客服</p>
                    </a>
                    <a href="#" class="flex flex-col items-center p-6 hover:bg-gray-50 transition-colors">
                        <div class="w-12 h-12 rounded-full bg-pink-100 flex items-center justify-center text-pink-500 mb-2">
                            <i class="fa fa-gift text-xl"></i>
                        </div>
                        <p class="text-sm">我的优惠券</p>
                    </a>
                    <a href="#" class="flex flex-col items-center p-6 hover:bg-gray-50 transition-colors">
                        <div class="w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center text-gray-500 mb-2">
                            <i class="fa fa-sign-out text-xl"></i>
                        </div>
                        <p class="text-sm">退出登录</p>
                    </a>
                </div>
            </div>
            
            <!-- 最近浏览 -->
            <div class="bg-white rounded-xl shadow-md">
                <div class="px-6 py-4 border-b border-gray-100 flex justify-between items-center">
                    <h2 class="text-xl font-bold">最近浏览</h2>
                    <button class="text-muted hover:text-dark text-sm flex items-center">
                        清空 <i class="fa fa-trash-o ml-1"></i>
                    </button>
                </div>
                
                <div class="p-6">
                    <div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4">
                        <!-- 商品1 -->
                        <div class="group">
                            <div class="relative overflow-hidden rounded-lg">
                                <img src="https://picsum.photos/200/200?random=10" alt="商品图片" class="w-full h-48 object-cover transition-transform duration-500 group-hover:scale-110">
                                <div class="absolute top-2 right-2">
                                    <button class="w-8 h-8 rounded-full bg-white/80 flex items-center justify-center text-muted hover:text-primary transition-colors">
                                        <i class="fa fa-heart-o"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="mt-2">
                                <h3 class="text-sm font-medium line-clamp-2">2025新款夏季女装连衣裙 时尚碎花修身中长款</h3>
                                <div class="mt-1 flex justify-between items-center">
                                    <span class="text-primary font-bold">¥199.00</span>
                                    <div class="flex text-yellow-400 text-xs">
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star-half-o"></i>
                                        <span class="text-muted ml-1">(4.5)</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 商品2 -->
                        <div class="group">
                            <div class="relative overflow-hidden rounded-lg">
                                <img src="https://picsum.photos/200/200?random=11" alt="商品图片" class="w-full h-48 object-cover transition-transform duration-500 group-hover:scale-110">
                                <div class="absolute top-2 right-2">
                                    <button class="w-8 h-8 rounded-full bg-white/80 flex items-center justify-center text-muted hover:text-primary transition-colors">
                                        <i class="fa fa-heart-o"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="mt-2">
                                <h3 class="text-sm font-medium line-clamp-2">男士商务休闲皮鞋 透气网面系带低帮软底</h3>
                                <div class="mt-1 flex justify-between items-center">
                                    <span class="text-primary font-bold">¥399.00</span>
                                    <div class="flex text-yellow-400 text-xs">
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star-o"></i>
                                        <span class="text-muted ml-1">(4.0)</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 商品3 -->
                        <div class="group">
                            <div class="relative overflow-hidden rounded-lg">
                                <img src="https://picsum.photos/200/200?random=12" alt="商品图片" class="w-full h-48 object-cover transition-transform duration-500 group-hover:scale-110">
                                <div class="absolute top-2 right-2">
                                    <button class="w-8 h-8 rounded-full bg-white/80 flex items-center justify-center text-muted hover:text-primary transition-colors">
                                        <i class="fa fa-heart-o"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="mt-2">
                                <h3 class="text-sm font-medium line-clamp-2">智能手表 运动监测心率睡眠多功能电子表</h3>
                                <div class="mt-1 flex justify-between items-center">
                                    <span class="text-primary font-bold">¥299.00</span>
                                    <div class="flex text-yellow-400 text-xs">
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <span class="text-muted ml-1">(5.0)</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 商品4 -->
                        <div class="group">
                            <div class="relative overflow-hidden rounded-lg">
                                <img src="https://picsum.photos/200/200?random=13" alt="商品图片" class="w-full h-48 object-cover transition-transform duration-500 group-hover:scale-110">
                                <div class="absolute top-2 right-2">
                                    <button class="w-8 h-8 rounded-full bg-white/80 flex items-center justify-center text-muted hover:text-primary transition-colors">
                                        <i class="fa fa-heart-o"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="mt-2">
                                <h3 class="text-sm font-medium line-clamp-2">无线蓝牙耳机 高清降噪入耳式</h3>
                                <div class="mt-1 flex justify-between items-center">
                                    <span class="text-primary font-bold">¥249.00</span>
                                    <div class="flex text-yellow-400 text-xs">
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star-half-o"></i>
                                        <i class="fa fa-star-o"></i>
                                        <span class="text-muted ml-1">(3.5)</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 商品5 -->
                        <div class="group">
                            <div class="relative overflow-hidden rounded-lg">
                                <img src="https://picsum.photos/200/200?random=14" alt="商品图片" class="w-full h-48 object-cover transition-transform duration-500 group-hover:scale-110">
                                <div class="absolute top-2 right-2">
                                    <button class="w-8 h-8 rounded-full bg-white/80 flex items-center justify-center text-muted hover:text-primary transition-colors">
                                        <i class="fa fa-heart-o"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="mt-2">
                                <h3 class="text-sm font-medium line-clamp-2">便携式充电宝 20000mAh大容量</h3>
                                <div class="mt-1 flex justify-between items-center">
                                    <span class="text-primary font-bold">¥129.00</span>
                                    <div class="flex text-yellow-400 text-xs">
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star-o"></i>
                                        <span class="text-muted ml-1">(4.0)</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 商品6 -->
                        <div class="group">
                            <div class="relative overflow-hidden rounded-lg">
                                <img src="https://picsum.photos/200/200?random=15" alt="商品图片" class="w-full h-48 object-cover transition-transform duration-500 group-hover:scale-110">
                                <div class="absolute top-2 right-2">
                                    <button class="w-8 h-8 rounded-full bg-white/80 flex items-center justify-center text-muted hover:text-primary transition-colors">
                                        <i class="fa fa-heart-o"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="mt-2">
                                <h3 class="text-sm font-medium line-clamp-2">智能手机钢化膜 全屏覆盖防指纹</h3>
                                <div class="mt-1 flex justify-between items-center">
                                    <span class="text-primary font-bold">¥39.00</span>
                                    <div class="flex text-yellow-400 text-xs">
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star"></i>
                                        <i class="fa fa-star-half-o"></i>
                                        <span class="text-muted ml-1">(4.5)</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>

        <!-- 页脚 -->
       <app-footer></app-footer>
    </div>
</body>
<script src="/static/js/vue.js"></script>
<script src="/static/js/top.js"></script>
<script src="/static/js/foot.js"></script>
<script src="/static/js/common.js"></script>
<script>
    // Vue实例
    new Vue({
        el: '#app',
        data: {
            util,
            username: ''
        },
        created(){
            util.store.set("return-url", location.href);
            if (this.util.isLogin()) {
               this.username= sessionStorage.getItem('user-info');
            } else location.href = '/login';
        }
    });
</script>
</html>    